﻿using System;
using System.ComponentModel.DataAnnotations;
using Viettel.VOFFICE.DAO.Models;

namespace Viettel.VOFFICE.Web.Models
{
    public class OfficePartnerModel : BaseModel
    {
        public int Id { get; set; }
        public string Name { get; set; }
        public string Email { get; set; }
        public string Address { get; set; }
        public bool? IsActive { get; set; }
        public string Phone { get; set; }
        public string Representer { get; set; }
        public DateTime CreatedAt { get; set; }
        public DateTime UpdatedAt { get; set; }
        public Guid? CreatorId { get; set; }

        public OfficePartnerModel()
        {
            IsActive = true;
            CreatedAt = DateTime.Now;
            UpdatedAt = DateTime.Now;
        }

        public OfficePartnerModel(OfficePartner officePartner)
        {
            Id = officePartner.Id;
            Name = officePartner.Name;
            Email = officePartner.Email;
            Address = officePartner.Address;
            IsActive = officePartner.IsActive;
            Phone = officePartner.Phone;
            Representer = officePartner.Representer;
            CreatedAt = officePartner.CreatedAt;
            UpdatedAt = officePartner.UpdatedAt;
            CreatorId = officePartner.CreatorId;
        }
    }
}